///PHILOTES Source Code.  (C)2012 PhiloLabs
#pragma once

#include "ExtrasPrerequisites.h"
#include "OgreSingleton.h"
#include "OgreResourceManager.h"
#include "Font.h"

namespace Extras
{
	
    class _PhiloExtrasExport FontManager : public Ogre::ResourceManager, public Ogre::Singleton< FontManager >
    {
    public:

		FontManager();
		~FontManager();

        void parseScript(DataStreamPtr& stream, const Ogre::String& groupName);
        
        static FontManager& getSingleton(void);
        
        static FontManager* getSingletonPtr(void);

    protected:

        /// Internal methods
		Resource* createImpl(const Ogre::String& name, ResourceHandle handle, 
			const Ogre::String& group, bool isManual, ManualResourceLoader* loader, 
            const NameValuePairList* params);
		void parseAttribute(const Ogre::String& line, FontPtr& pFont);

        void logBadAttrib(const Ogre::String& line, FontPtr& pFont);


    };
	
}

